package com.seckill.entity;

import java.util.Date;

/**
 * @Creation_time 2017/9/6
 * @Theme 秒杀商品表实体类
 * @Autor Xiao Yiyun
 */
public class Seckill {

    private int seckill_id;
    private String seckill_name;
    private int seckill_count;
    private Date seckill_start_time;
    private Date seckill_end_time;
    private Date seckill_create_time;

    public int getSeckill_id() {
        return seckill_id;
    }

    public void setSeckill_id(int seckill_id) {
        this.seckill_id = seckill_id;
    }

    public String getSeckill_name() {
        return seckill_name;
    }

    public void setSeckill_name(String seckill_name) {
        this.seckill_name = seckill_name;
    }

    public int getSeckill_count() {
        return seckill_count;
    }

    public void setSeckill_count(int seckill_count) {
        this.seckill_count = seckill_count;
    }

    public Date getSeckill_start_time() {
        return seckill_start_time;
    }

    public void setSeckill_start_time(Date seckill_start_time) {
        this.seckill_start_time = seckill_start_time;
    }

    public Date getSeckill_end_time() {
        return seckill_end_time;
    }

    public void setSeckill_end_time(Date seckill_end_time) {
        this.seckill_end_time = seckill_end_time;
    }

    public Date getSeckill_create_time() {
        return seckill_create_time;
    }

    public void setSeckill_create_time(Date seckill_create_time) {
        this.seckill_create_time = seckill_create_time;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        Seckill seckill = (Seckill) o;

        if (seckill_id != seckill.seckill_id) return false;
        if (seckill_count != seckill.seckill_count) return false;
        if (seckill_name != null ? !seckill_name.equals(seckill.seckill_name) : seckill.seckill_name != null)
            return false;
        if (seckill_start_time != null ? !seckill_start_time.equals(seckill.seckill_start_time) : seckill.seckill_start_time != null)
            return false;
        if (seckill_end_time != null ? !seckill_end_time.equals(seckill.seckill_end_time) : seckill.seckill_end_time != null)
            return false;
        return seckill_create_time != null ? seckill_create_time.equals(seckill.seckill_create_time) : seckill.seckill_create_time == null;

    }

    @Override
    public int hashCode() {
        int result = seckill_id;
        result = 31 * result + (seckill_name != null ? seckill_name.hashCode() : 0);
        result = 31 * result + seckill_count;
        result = 31 * result + (seckill_start_time != null ? seckill_start_time.hashCode() : 0);
        result = 31 * result + (seckill_end_time != null ? seckill_end_time.hashCode() : 0);
        result = 31 * result + (seckill_create_time != null ? seckill_create_time.hashCode() : 0);
        return result;
    }

    @Override
    public String toString() {
        return "Seckill{" +
                "seckill_id=" + seckill_id +
                ", seckill_name='" + seckill_name + '\'' +
                ", seckill_count=" + seckill_count +
                ", seckill_start_time=" + seckill_start_time +
                ", seckill_end_time=" + seckill_end_time +
                ", seckill_create_time=" + seckill_create_time +
                '}';
    }
}
